/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "tribut_cofins_cod_apuracao")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TributCofinsCodApuracao.findAll", query = "SELECT t FROM TributCofinsCodApuracao t")})
public class TributCofinsCodApuracao implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(name = "CST_COFINS", length = 2)
    private String cstCofins;
    @Column(name = "MODALIDADE_BASE_CALCULO")
    private Character modalidadeBaseCalculo;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "ALIQUOTA_PORCENTO", precision = 18, scale = 6)
    private BigDecimal aliquotaPorcento;
    @Column(name = "ALIQUOTA_UNIDADE", precision = 18, scale = 6)
    private BigDecimal aliquotaUnidade;
    @Column(name = "PORCENTO_BASE_CALCULO", precision = 18, scale = 6)
    private BigDecimal porcentoBaseCalculo;
    @Column(name = "PRECO_MAXIMO", precision = 18, scale = 6)
    private BigDecimal precoMaximo;
    @Column(name = "PAUTA_FISCAL", precision = 18, scale = 6)
    private BigDecimal pautaFiscal;
    @JoinColumn(name = "ID_CODIGO_APURACAO_EFD", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private CodigoApuracaoEfd idCodigoApuracaoEfd;
    @JoinColumn(name = "ID_TRIBUT_GRUPO_TRIBUTARIO", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private TributGrupoTributario idTributGrupoTributario;
    @JoinColumn(name = "ID_TRIBUT_COFINS", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private TributCofins idTributCofins;
    @JoinColumn(name = "ID_TRIBUT_OPERACAO_FISCAL", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private TributOperacaoFiscal idTributOperacaoFiscal;

    public TributCofinsCodApuracao() {
    }

    public TributCofinsCodApuracao(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCstCofins() {
        return cstCofins;
    }

    public void setCstCofins(String cstCofins) {
        this.cstCofins = cstCofins;
    }

    public Character getModalidadeBaseCalculo() {
        return modalidadeBaseCalculo;
    }

    public void setModalidadeBaseCalculo(Character modalidadeBaseCalculo) {
        this.modalidadeBaseCalculo = modalidadeBaseCalculo;
    }

    public BigDecimal getAliquotaPorcento() {
        return aliquotaPorcento;
    }

    public void setAliquotaPorcento(BigDecimal aliquotaPorcento) {
        this.aliquotaPorcento = aliquotaPorcento;
    }

    public BigDecimal getAliquotaUnidade() {
        return aliquotaUnidade;
    }

    public void setAliquotaUnidade(BigDecimal aliquotaUnidade) {
        this.aliquotaUnidade = aliquotaUnidade;
    }

    public BigDecimal getPorcentoBaseCalculo() {
        return porcentoBaseCalculo;
    }

    public void setPorcentoBaseCalculo(BigDecimal porcentoBaseCalculo) {
        this.porcentoBaseCalculo = porcentoBaseCalculo;
    }

    public BigDecimal getPrecoMaximo() {
        return precoMaximo;
    }

    public void setPrecoMaximo(BigDecimal precoMaximo) {
        this.precoMaximo = precoMaximo;
    }

    public BigDecimal getPautaFiscal() {
        return pautaFiscal;
    }

    public void setPautaFiscal(BigDecimal pautaFiscal) {
        this.pautaFiscal = pautaFiscal;
    }

    public CodigoApuracaoEfd getIdCodigoApuracaoEfd() {
        return idCodigoApuracaoEfd;
    }

    public void setIdCodigoApuracaoEfd(CodigoApuracaoEfd idCodigoApuracaoEfd) {
        this.idCodigoApuracaoEfd = idCodigoApuracaoEfd;
    }

    public TributGrupoTributario getIdTributGrupoTributario() {
        return idTributGrupoTributario;
    }

    public void setIdTributGrupoTributario(TributGrupoTributario idTributGrupoTributario) {
        this.idTributGrupoTributario = idTributGrupoTributario;
    }

    public TributCofins getIdTributCofins() {
        return idTributCofins;
    }

    public void setIdTributCofins(TributCofins idTributCofins) {
        this.idTributCofins = idTributCofins;
    }

    public TributOperacaoFiscal getIdTributOperacaoFiscal() {
        return idTributOperacaoFiscal;
    }

    public void setIdTributOperacaoFiscal(TributOperacaoFiscal idTributOperacaoFiscal) {
        this.idTributOperacaoFiscal = idTributOperacaoFiscal;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TributCofinsCodApuracao)) {
            return false;
        }
        TributCofinsCodApuracao other = (TributCofinsCodApuracao) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.TributCofinsCodApuracao[ id=" + id + " ]";
    }
    
}
